home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / qbredir.zip / REDTEST.BAS < prev    next >
BASIC Source File  |  1992-03-01  |  1KB  |  56 lines

  1. CLS
  2. PRINT "Demonstration of QBREDIR subroutines"
  3. PRINT " First, we'll do a normal shell to read the directory..."
  4. SHELL "dir/w"
  5. PRINT
  6. PRINT "Press a key..."
  7. SLEEP
  8.  
  9. CLS
  10. PRINT "Now we will do the same thing while redirecting"
  11. PRINT "the output to a file named dir.txt..."
  12. SHELL "dir/w >dir.txt"
  13. PRINT
  14. PRINT "Didn't see anything happening, did you?"
  15. PRINT "Press a key..."
  16. SLEEP
  17.  
  18. CLS
  19. PRINT
  20. PRINT "Now we will do the same thing using QBREDIR"
  21. PRINT "to display the output while being sent to dir1.txt."
  22. Redflag% = 1
  23. CALL QFRedSet(Redflag%)
  24. SHELL "dir/w >dir1.txt"
  25. PRINT "You observed the directory being printed to the file."
  26. PRINT "Press a key..."
  27. SLEEP
  28.  
  29. CLS
  30. Redflag% = 0
  31.  
  32. PRINT
  33. PRINT "Now our flag is off, so we will try it once more."
  34. PRINT "This time, we will redirect to dir2.txt."
  35. PRINT "Press a key..."
  36. SLEEP
  37.  
  38. SHELL "dir/w >dir2.txt"
  39. PRINT
  40. PRINT "Once again, you didn't see anything displayed."
  41. PRINT "Press a key..."
  42. SLEEP
  43.  
  44. CALL QFRedOff
  45. CLS
  46. PRINT "QBREDIR test done"
  47. PRINT
  48. PRINT "Just be sure to reset the interrupt 21 vector"
  49. PRINT "before your program ends!!"
  50. PRINT
  51. PRINT "Press a key to end..."
  52. SLEEP
  53.  
  54. CLS
  55.  
  56.